# 模块名称
set(MODULE remote)

find_path(LIBEVENT_INCLUDE_DIRECTORY event.h ${PRODUCT_ROOT_DIR}/thirdparty/libevent/include NO_DEFAULT_PATH)
find_library(LIBEVENT_LIBRARY event ${LIBEVENT_LIBS_DIR} NO_DEFAULT_PATH)
list(APPEND LIBEVENT_INCLUDE_DIRECTORY ${LIBEVENT_INCLUDE_DIR})

find_library(XFRP_LIBRARY xfrp ${XFRP_LIBS_DIR} NO_DEFAULT_PATH)
include_directories(${XFRP_INCLUDE_DIR} ${LIBEVENT_INCLUDE_DIRECTORY})

aux_source_directory(.  DIRSRCS)
list(APPEND DIRSRCS ${PRODUCT_ROOT_DIR}/vendor/vendor_base.cpp)
add_executable((${MODULE} ${DIRSRCS})
target_link_libraries(${MODULE} ${XFRP_LIBRARY}  ${LIBEVENT_LIBRARY} utils)

install(TARGETS ${MODULE}
        DESTINATION bin/
        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ)